//
//  BehindTheMaskAppDelegate.m
//  BehindTheMask
//
//  Created by Yosuke Suzuki on 08/03/11.
//  Copyright __MyCompanyName__ 2008. All rights reserved.
//

#import "BehindTheMaskAppDelegate.h"
#import "Console.h"
#import "WebBrowser.h"
#import "FontSelector.h"

@implementation BehindTheMaskAppDelegate

- (UIViewController *)createViewController {
	// Create a toolbar controller and an array to contain the view controllers
	
	UIToolbarController *toolbar = [[UIToolbarController alloc] init];
	toolbar.delegate = self;
	toolbar.allowsCustomizing = YES;
	
	toolbar.viewControllers = [NSArray arrayWithObjects:
											[Console sharedConsole], 
										 [[[WebBrowser alloc] init] autorelease], 
										 [[[WebBrowser alloc] init] autorelease], 
										 [[[WebBrowser alloc] init] autorelease], 
											[FontSelector fontSelector], 
											nil];
	return toolbar;
}

- (void)toolbarController:(UIToolbarController *)toolbarController didEndCustomizingViewControllers:(NSArray *)viewControllers changed:(BOOL)changed {
	NSLog(@"%@", viewControllers);
	
	[[Console sharedConsole] log:@"toolbarController:didEndCustomizingViewControllers:changed:"];
}

@end

